package se.chalmers.tda366.crumble.gui.components;

import java.awt.Color;

import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.LineBorder;

import se.chalmers.tda366.crumble.core.IArticle;
import se.chalmers.tda366.crumble.gui.utils.IArticleLink;


public class ArticleListItem extends JPanel implements IArticleLink{
	
	JLabel headlineLabel;
	IArticle article;
	
	ArticleListItem(String s, IArticle article){
		this.article=article;
		headlineLabel = new JLabel(s);
		headlineLabel.setFont(se.chalmers.tda366.crumble.resources.Constants.HEADLINE2FONT);
		headlineLabel.setPreferredSize(new java.awt.Dimension(300,15));
		this.add(headlineLabel);
		this.setBackground(Color.white);
		this.addMouseListener(new se.chalmers.tda366.crumble.gui.utils.CrumbleMouseListener());
		headlineLabel.setBorder(new LineBorder(Color.white, 2));
		this.setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));
	}
	
	public IArticle getArticle(){
		return article;
	}
	
	public void setHeadlineColor(Color c){
		
	}
	
	

}
